<!--#Include File="LoginCheck.asp"-->
<!--#Include File="Conn.asp"-->



<script>
	function ToEscape()
	{
		$('input[name=mailSubject]').val(escape($('input[name=mailSubject1]').val()));
		$('input[name=mailBody]').val(escape($('textarea[name=mailBody1]').val()));
		myform2.action = '/admin/suuntomail.asp';
		//myform2.submit();
		$.post(
			'FeedFlag.asp',
			{id:<%=Request("id")%>},
			function(data){
				if(data == 0)
				{
					alert(data);
				}
				else
				{
					if($('#F<%=Request("id")%>').attr('title') != null)
					{
						$('#F<%=Request("id")%>').attr('title',data);
					}
					else
					{
						$('dt[value=<%=Request("id")%>]').append('<span id="F<%=Request("id")%>" title="'+data+'" style="display:block; background:url(Images/Icon.color.gif) -114px -29px no-repeat; width:16px; height:16px;" ></span>');
					}
				}
			}
		
		);
	}
</script>

<%
	if Request("mail") <> "" Then
		set cmdObject = Server.CreateObject("ADODB.Command")
		Set rs = Server.CreateObject("Adodb.RecordSet")
		rs.CursorLocation = 3
		rs.open "GetMailConfigInfo" ,Conn,1,1
		%>
        <div style="margin:10px; line-height:150%;">
            <form name="myform2" method="post" target="bottomFrame">
            TO: <%=Request("mail")%><br /><br />
            标题：<input type="text"  name="mailSubject1" value="" size="50" /><br /><br />

            <textarea cols="70" rows="14" wrap="hard" name="mailBody1" id="mailBody1"></textarea><br />
            
            <input type="hidden"  name="mailSubject" value=""/>
            <input type="hidden"  name="mailBody" value=""/>
            <input type="hidden"  name="id" value="<%=Request("id")%>"/>
            <input type="hidden"  name="mailTo" value="<%=Request("mail")%>" />
            <input type="hidden"  name="mailSmtp" value="<%=rs("mailSmtp")%>" />
            <input type="hidden"  name="mailAccount"value="<%=rs("mailAccount")%>"  />
            <input type="hidden"  name="mailPass" value="<%=escape(rs("mailPassword"))%>" />
            <input type="hidden" name="mailFrom" value="<%=rs("mailFrom")%>" />
            <input type="hidden" name="mailCharset"  value="<%=rs("mailCharset")%>"  />    
            <input type="hidden" name="flag" value="1" />
            <input type="submit" value="发送邮件" onclick="javascript:ToEscape();" class="button" />
            </form>
        <iframe name="bottomFrame" id="bottomFrame" width="200" height="20" frameborder="0" scrolling="no" ></iframe>
        </div>
        
        <%		
	
	Else
		Response.Write("Error")
		Response.End()
	End If
%>
